import { Component, Input, OnInit, OnDestroy } from '@angular/core';
import { NbThemeService } from '@nebular/theme';
import { BasicService } from '../../../@core/data/basic.service';
@Component({
  selector: 'ngx-previewq',
  templateUrl: './previewq.component.html',
  styleUrls: ['./previewq.component.scss'],
})
export class PreviewqComponent implements OnInit, OnDestroy {
  currentTheme: string;
  themeSubscription: any;

  @Input() question: any;
  @Input() choiceHidden: boolean;

  constructor(private themeService: NbThemeService, private basicService: BasicService) {
    this.themeSubscription = this.themeService.getJsTheme().subscribe(theme => {
      this.currentTheme = theme.name;
    });
  }
  ngOnInit() {
    this.question = this.question || {};
  }
  ngOnDestroy() {
    this.themeSubscription.unsubscribe();
  }

}
